
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type SystemCrudDataRequest struct {

	Cid string `json:"cid" form:"cid"`

	Pid string `json:"pid" form:"pid"`

	Name string `json:"name" form:"name"`

	Value string `json:"value" form:"value"`

	Sort string `json:"sort" form:"sort"`

	AddTime string `json:"add_time" form:"add_time"`

}

func (r *SystemCrudDataRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *SystemCrudDataRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"cid": "required",

		"pid": "required",

		"name": "required",

		"value": "required",

		"sort": "required",

		"add_time": "required",

	}
}

func (r *SystemCrudDataRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemCrudDataRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemCrudDataRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
